
#include <iostream>
#include <time.h>


void intToTime(time_t cur1)
{
	 struct tm t1;
	 localtime_r((const time_t*)&cur1,&t1);
//	 struct tm* t2 = localtime((const time_t*)&cur1);	
	 std::cout<<"year:"<<t1.tm_year<<"\nmom:"<<t1.tm_mon<<"\ndays:"<<t1.tm_mday<<std::endl;
//	 std::cout<<"year:"<<t2->tm_year<<"\nmom:"<<t2->tm_mon<<"\ndays:"<<t2->tm_mday<<std::endl;
}


int main()
{
	unsigned int cur1=1432745602, cur2=1432745700;
	intToTime(cur1);
	intToTime(cur2);
	time_t t;
	t=time(0);
	std::cout<<t<<std::endl;
	intToTime(t);
	return 0;
		
}
